package XB;

import java.util.Scanner;

public class Student {
    String name;
    String task1;
    String task2;
    String task3;
    double money;
    String[] record1={"无","无","无","无","无"};
    String[] record2={"无","无","无","无","无"};
    String[] record3={"无","无","无","无","无"};
    public Student(String name,String task1,String task2,String task3,int money){
        this.name=name;
        this.task1=task1;
        this.task2=task2;
        this.task3=task3;
        this.money=money;
    }
    public String toString() {
        return "姓名"+name+"\n"+
                "负责的实验室1 "+task1+ "\n"+"第1周 "+
                record1[0]+"\n" +"第2周 "+record1[1]+"\n"+"第3周 "+record1[2]+"\n"+"第4周 "+record1[3]+"\n"+"第5周 "+record1[4]+"\n"+
                "负责的实验室2 "+task2+"\n"+"第1周 "+
                record2[0]+"\n" +"第2周 "+record2[1]+"\n"+"第3周 "+record2[2]+"\n"+"第4周 "+record2[3]+"\n"+"第5周 "+record2[4]+"\n"+
                "负责的实验室3 "+task3+"\n"+"第1周 "+
                record3[0]+"\n" +"第2周 "+record3[1]+"\n"+"第3周 "+record3[2]+"\n"+"第4周 "+record3[3]+"\n"+"第5周 "+record3[4]+"\n"+
                "实际收入："+money+"\n";
    }

    public void choice1(Student student, Task task) {
        System.out.println("按1选择，按2不选");
        Scanner input1 = new Scanner(System.in);
        int c1 = input1.nextInt();
        if (c1 == 1) {
            student.task1 = task.name;
            task.person = student.name;
            System.out.println("选择成功");
        }
        if (c1 == 2) {
            System.out.println("未进行选择");
        }
    }
    public void choice2(Student student,Task task) {
        System.out.println("按1选择，按2不选");
        Scanner input1 = new Scanner(System.in);
        int c1 = input1.nextInt();
        if (c1 == 1) {
            student.task2 = task.name;
            task.person = student.name;
            System.out.println("选择成功");
        }
        if (c1 == 2) {
            System.out.println("未进行选择");
        }
    }
    public void choice3(Student student,Task task) {
        System.out.println("按1选择，按2不选");
        Scanner input1 = new Scanner(System.in);
        int c1 = input1.nextInt();
        if (c1 == 1) {
            student.task3 = task.name;
            task.person = student.name;
            System.out.println("选择成功");
        }
        if (c1 == 2) {
            System.out.println("未进行选择");
        }
    }
}
